package ru.alexo.whiskey.events;

import java.io.DataOutputStream;
import java.io.IOException;
import java.io.OutputStream;

/**
 * Base event of the track.
 * 
 * @author Exaybachay
 */
public interface TrackEvent {

    /**
     * Serializes the event content to a provided stream.
     * 
     * @param dos
     *            {@link DataOutputStream} instance
     * @param offset
     *            TODO
     * @return offset value for the next note played after this one. Required
     *         mainly for pause notes.
     * 
     * @throws IOException
     *             if failed to serialize to stram.
     */
    public abstract int serializeToStream(OutputStream dos, int offset) throws IOException;

}
